/**
 * Copyright (c) 2009-2011, chunquedong(YangJiandong)
 * 
 * This file is part of ChunMap project
 * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE(Version >=3)
 * 
 * History:
 *     2010-05-05  Jed Young  Creation
 */
package chunmap.app;

import java.awt.Graphics;
import java.awt.Image;
import java.awt.image.ImageObserver;

import chunmap.app.bench.Command;
import chunmap.app.bench.Tool;
import chunmap.util.Function;
import chunmap.view.View;
import chunmap.view.layer.LayerCollection;
/**
 * 地图控件接口
 * @author chunquedong
 * 
 */
public interface MapCtrl extends ImageObserver{
	
	public Image getBufferImage();
	public Image getOriginImage();
	public Graphics getGraphics();
	public Graphics getBufferGraphics();
	//-------------------------------------------
	public void addPlug(Tool plug);
	public void setCurrentPlug(Tool plug);
	public void executeCommand(Command cmd);
	public void undo();
	public void redo();
	public Tool getPlug(String id);
	//--------------------------------------------
	public View getView();
	public LayerCollection getLayerCollection();
	//--------------------------------------------
	/**
	 * 刷新地图
	 */
	public void refreshMap();
	public void fullView();
	public void resetSize(int width, int height);
	public void addListener(Function func);
}